package com.sneakxy.cloudbase.platform.bean;

import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;

import com.sneakxy.mybatis.commons.annotations.Column;
import com.sneakxy.mybatis.commons.annotations.Table;
import com.sneakxy.mybatis.commons.orm.generation.GeneratedValue;
import com.sneakxy.mybatis.commons.orm.generation.GenerationType;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 角色信息
 * @author 潜行的虚影
 * @see
 */
@Data
@Table("t_mb4j_role")
@EqualsAndHashCode(callSuper = false)
public class Role extends BaseEntity<String> implements TimeEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2728581079784919157L;

	/**
	 * 角色ID
	 */
	@Id
	@Column("id")
	@GeneratedValue(strategy = GenerationType.MANUAL)
	private String id;

	/**
	 * 角色名称
	 */
	@Column("name")
	private String name;

	/**
	 * 备注
	 */
	@Column("memo")
	private String memo;

	/**
	 * 排序
	 */
	@Column("sort")
	private Integer sort;

	/**
	 * 
	 */
	@Column("createtime")
	private String createtime;

	/**
	 * 
	 */
	@Column("updatetime")
	private String updatetime;

	@Transient
	private boolean isNew;

	/* (non-Javadoc)
	 * @see com.sneakxy.cloudbase.base.bean.BaseEntity#isNew()
	 */
	@Override
	public boolean isNew() {
		return isNew || super.isNew();
	}

	/**
	 * @param isNew the isNew to set
	 */
	public void setNew(boolean isNew) {
		this.isNew = isNew;
	}
	
}
